<?php
namespace app\admin\services;


use extend\utils\JwtAuth;

abstract class BaseServices
{

    /**
     * 创建token
     * @param int $id
     * @param $type
     * @return string|null
     */
    public function createToken(array $data = [] , ?int $expire = 172800 , string $secret = '' , string $iss = 'webman' , string $sub = "theme" , string $aub = "user")
    {
        /** @var JwtAuth $jwtAuth */
        $jwtAuth = new JwtAuth();
        return $jwtAuth->createToken($data , $expire , $secret , $iss , $sub , $aub);
    }

}